<?php echo $this->render('_header.phtml') ?>

<?php  
    if ((Zend_Controller_Front::getInstance()->getRequest()->getControllerName() == "index") &&
        (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == "index")) {
        echo $this->render('_nav_home.phtml');
    }else{
        echo $this->render('_nav.phtml');
    } 
?>

<div class="content">
    <div class="waypoint container">
        <div class="row">
            <div class="col-md-12">
                <?php if (isset($_SESSION["message_success"]) && ($_SESSION["message_success"] != NULL)) { ?>
                    <div class="alert alert-success alert-dismissable">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                        <strong>Sucesso!</strong> <?php echo $_SESSION["message_success"]; ?>
                    </div>
                <?php } $_SESSION["message_success"] = NULL; ?>
                
                <?php if (isset($_SESSION["message_warning"]) && ($_SESSION["message_warning"] != NULL)) { ?>
                    <div class="alert alert-warning alert-dismissable">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                        <strong>Atenção!</strong> <?php echo $_SESSION["message_warning"]; ?>
                    </div>
                <?php } $_SESSION["message_warning"] = NULL; ?>
                
                <?php if (isset($_SESSION["message_danger"]) && ($_SESSION["message_danger"] != NULL)) { ?>
                    <div class="alert alert-danger alert-dismissable">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                        <strong>Erro!</strong> <?php echo $_SESSION["message_danger"]; ?>
                    </div>
                <?php } $_SESSION["message_danger"] = NULL; ?>
            </div>
        </div>
    </div>
</div>

<div class="content">
    <?php echo $this->layout()->content; ?>
</div>

<?php echo $this->render('_footer.phtml') ?>